import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../../AppConfig/Config.dart';
import '../../http/NoLoadingGetApi.dart';

class ProblemDetails extends StatefulWidget {
  const ProblemDetails({super.key, required this.dataMap});
  final Map dataMap;
  @override
  State<ProblemDetails> createState() => _ProblemDetailsState();
}

class _ProblemDetailsState extends State<ProblemDetails> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();

   }

  @override
  Widget build(BuildContext context) {
    final screenSize = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor:Colors.white,
      appBar: AppBar(
        leading: IconButton(
          icon: Icon(Icons.arrow_back_ios, color: Colors.black),
          onPressed: () => Navigator.of(context).pop(),
        ),
        backgroundColor: Colors.white,
        centerTitle: true,
        title: Text("常见问题",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w300,fontSize: 16.sp),),
      ),
      body: ListView(
        children: [
                SizedBox(height: 10.h,),
          Center(
            child: Text(widget.dataMap['dictLabel'],style: TextStyle(fontSize: 16.sp,fontWeight: FontWeight.w600,color: Colors.black),),
          ),
          SizedBox(height: 8.h,),
          Container(
            margin: EdgeInsets.only(left: 20.w,right: 20.w),
              constraints: BoxConstraints(
                maxWidth:screenSize.width-40.w, // 限制文本最大宽度
              ),
            child: Text(widget.dataMap['extJson'],style: TextStyle(color: MyColors.textColor,fontSize: 14.sp),),
          )
        ],
      ),
    );
  }
}
